# -*- coding: utf-8 -*-

from dramkit import simple_logger, logger_show
from dramkit.gentools import raise_error, RaiseError

from _test_raise_error2 import test2


def test():
    logger = simple_logger('./test_raise_error.log', 'w')  
    try:
        raise_error('MyError1', 'test myerror', logger=logger)
    except:
        logger_show('-------------', logger)
        raise_error('MyError2', 'test myerror', code=1, logger=logger)
    

def test21():
    test2()
    
    
def test3():
    a = RaiseError()
    a.raise_error('a', 'b')
    

if __name__ == '__main__':
    # test()
    # test2()
    # test21()
    test3()